package com.xywh.emergency_outbound.mvp.ui.adapter;

import android.content.Context;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xywh.emergency_outbound.R;
import com.xywh.emergency_outbound.mvp.ui.entity.Tab2;

import java.util.List;


public class OrderListAdapter extends BaseQuickAdapter<Tab2.DataBean.EmgTransferItemsBean, BaseViewHolder> {

    private Context mContext;

    public OrderListAdapter(Context context, @Nullable List<Tab2.DataBean.EmgTransferItemsBean> data) {
        super(R.layout.item_order_list, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, Tab2.DataBean.EmgTransferItemsBean item) {
        //GlideUtil.loadImage(mContext,item.getImg(),helper.getView(R.id.img_head));
        helper.setText(R.id.tv_title, item.getMaterialName());
        helper.setText(R.id.tv_warehouse, "出库仓库：" + item.getOutStoreName());
        helper.setText(R.id.tv_required_quantity, "需求数量：" + item.getTransMaterialNum());
    }

}
